GithubHelp home page GithubHelp logo

Comments (12)

CyCodeDE avatar CyCodeDE commented on May 23, 2024 1

Now it works, thank you!

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024 1

Okay, so I've patched this issue with version 2.0.3. The issue was my own oversite not fixing the build and install process for new users after modifying the session lock and the removal of certain root requirements.

@mirh Funnily enough, this error literally only occurred with new installs. If you were performing an upgrade all the folders would have existed preventing the error from occurring.

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024

@CyCodeDE

The reason sudo rm /tmp/pacback_session.lck does not work is that is has been completely removed in version 2.0.2. Pacback now uses fcntl to create open file locks. Once pacback's runtime concludes, the file is closed regards of a crash or a safe session close. Also pacback no longer uses hardcoded user home paths so that shouldn't be an issue either.

#29 Has been successfully fixed so this is most likely an edge case error.

Can you please send me the output of ls /var/lib/pacback?
If pacback_session.lck exists in this directory try removing it, although this should make no difference in theory.

from pacback.

mirh avatar mirh commented on May 23, 2024

I had the same problem (yes, with 2.0.2)
Then I downgraded to 2.0.1 (removed the hook, because that's what I wanted to do.. idk if it matters), reinstalled 2.0.2 and it was working as expected.

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024

Bizzare, I wonder if this has to do with some issue with the build package itself. (The hook is overwritten on each install so it shouldn't make a difference.)

@mirh So when you say 'working as expected' can I take it 2.0.2 is now working properly for you? I've tested the upgrade process on my test vms and it seemed to work fine.

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024

I have tried to recreate this issue across multiple vm's doing both upgrades and downgrades without being able to get this behavior to manifest.

Please try the following as a last-ditch effort if this continues.

  1. sudo pacman -R pacback Will remove pacback and wipe all restore points, snapshots, configs, and application files.
  2. yay -S pacback Will perform a fresh install. (Or substitute your AUR Manager of choice)

If the behavior continues, I will need to do some serious bug testing as this is being caused by something not obvious/easily fixable.

from pacback.

CyCodeDE avatar CyCodeDE commented on May 23, 2024

Reinstalling did not help. And the pacback directory does not even exist in /var/lib

from pacback.

mirh avatar mirh commented on May 23, 2024

So when you say 'working as expected' can I take it 2.0.2 is now working properly for you?

Yes. I wasn't upgrading though. It was on a fresh VM (with an empty /home partition, and no sudoers, intriguingly)

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024

Yeah, so this officially a bug then.

@mirh With the new version of pacback that shouldn't even matter because normal user paths are pulled out of /etc/passwd. If there aren't any normal users defined then it just skips looking in those directories. Even if you set your home path to /random/path/ it would pick it up fine.

@CyCodeDE So I apologize for this but I will probably need to ping you with some questions as I try and figure out why/how this is even happening.

Can you type this in your terminal then copy and paste the exact output for me to see?
yay -S pacback && pacback -ls && sudo pacback -c 1

from pacback.

CyCodeDE avatar CyCodeDE commented on May 23, 2024

This is the exact output:

` ❯ yay -S pacback && pacback -ls && sudo pacback -c 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] pacback-2.0.2-0

1 pacback (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> a
:: Deleting (1/1): /home/cycode/.cache/yay/pacback
:: Downloaded PKGBUILD (1/1): pacback
1 pacback (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: (1/1) Parsing SRCINFO: pacback
==> Erstelle Paket: pacback 2.0.2-0 (Sa 12 Sep 2020 17:20:19 CEST)
==> Empfange Quellen...
-> Lade pacback-2.0.2-SOURCE.tar.zst herunter...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 654 100 654 0 0 3613 0 --:--:-- --:--:-- --:--:-- 3593
100 28016 100 28016 0 0 26134 0 0:00:01 0:00:01 --:--:-- 26134
==> Überprüfe source Dateien mit sha512sums...
pacback-2.0.2-SOURCE.tar.zst ... Durchgelaufen
==> Erstelle Paket: pacback 2.0.2-0 (Sa 12 Sep 2020 17:20:21 CEST)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
-> pacback-2.0.2-SOURCE.tar.zst gefunden
==> Überprüfe source Dateien mit sha512sums...
pacback-2.0.2-SOURCE.tar.zst ... Durchgelaufen
==> Entferne existierendes $srcdir/ Verzeichnis...
==> Entpacke Quellen...
-> Entpacke pacback-2.0.2-SOURCE.tar.zst mit bsdtar
==> Quellen sind fertig.
==> Erstelle Paket: pacback 2.0.2-0 (Sa 12 Sep 2020 17:20:23 CEST)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> WARNUNG: Verwende bestehenden $srcdir/ Baum
==> Betrete fakeroot Umgebung...
==> Beginne package()...
==> Säubere Installation...
-> Entferne libtool Dateien...
-> Bereinige ungewollte Dateien...
-> Entferne statische Bibliotheken...
-> Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken...
-> Komprimiere Man-Pages und Info-Seiten...
==> Prüfe auf Paketierungsprobleme...
==> Erstelle Paket "pacback"...
-> Erstelle .PKGINFO Datei...
-> Erstelle .BUILDINFO Datei...
-> Füge install Datei hinzu...
-> Erstelle .MTREE-Datei...
-> Komprimiere Paket...
==> Verlasse fakeroot Umgebung.
==> Beendete Erstellung: pacback 2.0.2-0 (Sa 12 Sep 2020 17:20:25 CEST)
==> Räume auf...
[sudo] Passwort für cycode:
Lade Pakete...
Warnung: pacback-2.0.2-0 ist aktuell -- Reinstalliere
Löse Abhängigkeiten auf...
Suche nach in Konflikt stehenden Paketen...

Pakete (1) pacback-2.0.2-0

Gesamtgröße der installierten Pakete: 0,10 MiB
Größendifferenz der Aktualisierung: 0,00 MiB

:: Installation fortsetzen? [J/n]
(1/1) Prüfe Schlüssel im Schlüsselring [#########################################################################] 100%
(1/1) Überprüfe Paket-Integrität [#########################################################################] 100%
(1/1) Lade Paket-Dateien [#########################################################################] 100%
(1/1) Prüfe auf Dateikonflikte [#########################################################################] 100%
(1/1) Überprüfe verfügbaren Festplattenspeicher [#########################################################################] 100%
Warnung: konnte Dateiinformationen für tmp/alpha-upgrade.sh nicht ermitteln
:: Verarbeite Paketänderungen...
(1/1) Installiere pacback [#########################################################################] 100%
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback’: Datei oder Verzeichnis nicht gefunden
find: ‘/var/lib/pacback/restore-points’: Datei oder Verzeichnis nicht gefunden
:: Starte post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Traceback (most recent call last):
File "/usr/bin/pacback", line 88, in
user.list_all(config)
File "/usr/share/pacback/core/user.py", line 47, in list_all
rps = sorted(m for m in paf.scan_dir(config['rp_paths'])[0] if m.endswith('.meta'))
File "/usr/share/pacback/core/paf/file.py", line 19, in scan_dir
for x in os.scandir(path):
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pacback/restore-points' `

from pacback.

CyCodeDE avatar CyCodeDE commented on May 23, 2024

Whoops accidently closed it

from pacback.

JustinTimperio avatar JustinTimperio commented on May 23, 2024

So I am relying on google translate here but this doesn't have to deal with pacback session locks but is a build package and install issue as I suspected. I have finally been able to reproduce this issue and it's such a stupid mistake on my part.

Previously, pacback expected sudo for every command, so when the path /var/lib/pacback was missing, it could be easily created. But because I changed this and also implemented these lines of code in the new lock system, when pacback tries to create a lock file it can't because the folder doesn't exist, and except OSError catches this and reports it as an active session. The same also happens during pacback -ls which looks for that folder and can't find it.

Thankfully this is an insanely simple fix I need to make to the buildpkg. I am going to make some quick edits and test this now.
Thanks for helping me figure this one out.

from pacback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.