Comments (12)
Now it works, thank you!
from pacback.
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.
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.
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.
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.
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.
sudo pacman -R pacback
Will remove pacback and wipe all restore points, snapshots, configs, and application files.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.
Reinstalling did not help. And the pacback directory does not even exist in /var/lib
from pacback.
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.
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.
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.
Whoops accidently closed it
from pacback.
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)
- Root is asked for really too many things HOT 2
- Bad offered packages version order HOT 4
- Multiple packages installation should happen together HOT 3
- --rollback features request HOT 9
- KeyboardInterrupt error is not handled nicely HOT 3
- Automatic sudo is not handled correctly HOT 5
- Add option to tag/label restore points HOT 2
- Using pacback -pkg A B fails when A depends on B and vice versa HOT 1
- Allow install hook to add auto-incrementing hooks HOT 6
- No option for `downgrade_pkg` argument HOT 2
- ModuleNotFoundError: No module named 'rich' HOT 5
- pacback already has an active session running HOT 8
- Problems with big rollbacks HOT 4
- Popen Error in `utils.reboot_check()` HOT 2
- Spelling error HOT 2
- What is the difference between Restore Point and Snapback? HOT 4
- Pacback unable to find dhclient package (due to funky version string?) HOT 2
- No snapshots being made HOT 6
- Help -h page formatting make it difficult to read
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pacback.