Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: don't fail if systemd is not ready #31

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

brainexe
Copy link
Contributor

@brainexe brainexe commented Feb 7, 2025

We faced a small issue while upgrading the package in a non systemd-context (in chroot). I just made the prerm more tolerant now.

/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold -o APT::Get::Remove=No install grafsy' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
  grafsy
1 upgraded, 0 newly installed, 0 to remove and 113 not upgraded.
Need to get 0 B/4796 kB of archives.
After this operation, 1109 kB of additional disk space will be used.
(Reading database ... 54271 files and directories currently installed.)
Preparing to unpack .../grafsy_2.1.5.c14.gf4d3a0e_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/grafsy.service.
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: warning: old grafsy package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: error processing archive /var/cache/apt/archives/grafsy_2.1.5.c14.gf4d3a0e_amd64.deb (--unpack):
 new grafsy package pre-removal script subprocess returned error exit status 1
disabled

@Felixoid
Copy link
Collaborator

Felixoid commented Feb 7, 2025

Did you check it works with the new script? Could you provide the output?

@brainexe
Copy link
Contributor Author

brainexe commented Feb 7, 2025

yea, I tested in the broken chroot context and in a default Debian environment. Both ones worked, here the new Debian logs from apt upgrade:

Preparing to unpack .../grafsy_2.1.6.c0.g11a5b18_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/grafsy.service.
Unpacking grafsy (2.1.6.c0.g11a5b18) over (2.1.5.c14.gf4d3a0e) ...
Setting up grafsy (2.1.6.c0.g11a5b18) ...
disabled
Created symlink /etc/systemd/system/multi-user.target.wants/grafsy.service -> /lib/systemd/system/grafsy.service.

For the other one I only have the history.log which does not contain whole stdout...just succeeded now:

/var/log/apt/history.log:Commandline: /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold -o APT::Get::Remove=No install grafsy
/var/log/apt/history.log-Requested-By: matze (25932)
/var/log/apt/history.log:Upgrade: grafsy:amd64 (2.1.5.c0.g1b35dc8, 2.1.6.c0.g11a5b18)
/var/log/apt/history.log-End-Date: 2025-02-07  10:08:58

@Felixoid Felixoid merged commit 22c3168 into leoleovich:master Feb 7, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants