Code Monkey home page Code Monkey logo

pacback's Introduction

Pacback

AUR Main AUR Git Codacy grade GitHub

Index:

  1. CLI Commands
  2. Install Instructions
  3. User Guide
  4. Developer Guide

Abstract:

Being at the head of Linux kernel and application development means access to the latest features but also often means dealing with the latest bugs. While I don't run into major bugs often, when they happen, they cripple my productivity. Reversing individual packages is generally a slow manual process and while some tools exist, none meet my needs. In particular, support for downgrading AUR packages is extremely lacking. To combat these issues I wrote pacback to automate various downgrade methods for restoring Arch Linux to a previous version state.

Core Features:

  • Resilient Downgrades and Upgrades
  • Rolling System Snapshots
  • Rollback to Arch Archive Dates
  • Easy Tracking of All System Additions, Removals, and Upgrades
  • Native Support for AUR Packages
  • Storage and Restoration of Version Dependent Files
  • Multi-Threaded Operations

Pacback CLI Commands and Flags:

Pacback offers several core commands that streamline the process of creating and restoring versions. The CLI is designed to be dead simple and provide detailed feedback and user control.

Core Commands

  • -c, --create_rp | Generate a pacback restore point. Takes a restore point # as an argument.
    Example: pacback -c 1
  • -rp, --restore_point | Rollback to a previously generated restore point.
    Example: pacback -rp 1
  • -ss, --snapshot | Restore the system to an automatically created snapshot.
    Example: pacback -ss 2
  • -dt, --date | Rollback to a date in the Arch Linux Archive.
    Example: pacback -dt 2019/08/14
  • -pkg, --package | - Rollback a list of packages looking for old versions on the system.
    Example: pacback -pkg zsh cpupower neovim

Flags

  • -f, --full_rp | Generate a pacback full restore point.
    Example: pacback -f -c 1
  • -d, --add_dir | Add any custom directories to your restore point during a --create_rp AND --full_rp.
    Example: pacback -f -c 1 -d /dir1/to/add /dir2/to/add /dir3/to/add
  • -nc, --no_confirm | Skip asking user questions during RP creation. Will answer yes to most input.
    Example: pacback -nc -c 1
  • -l, --label | Add a label to your restore point.
    Example: pacback -nc -c 1 -f -l 'Production'

Print Info

  • -ls, --list | List information about all restore points and snapshots.
    Example: pacback -ls
  • -i, --info | Print information about a retore point or snapshot.
    Example: pacback -i rp1 or pacback -i ss1
  • -df, --diff | Compare any two restore points or snapshots.
    Example: pacback -df rp1 rp2 or pacback -df rp1 ss1
  • -v, --version | Display pacback version and cache information.
    Example: pacback -v

Utilities

  • -cache, --cache_size | Calculate reported and actual cache sizes.
    Example: pacback -cache
  • -cl, --clean | Clean old and orphaned pacakages along with old restore points.
    Example: pacback -cl
  • -rm, --remove | Removes the selected restore point.
    Example: pacback -rm 12 -nc
  • --install_hook | Install a pacman hook that creates a snapshot during each pacman transaction.
    Example: pacback --install_hook
  • --remove_hook | Removes the pacman hook that creates snapshots.
    Example: pacback --remove_hook

Install Instructions:

Pacback offers two AUR packages. (Special thanks to Attila Greguss for maintaining them.)

pacback: This is the recommended install for most users. Releases mark stable points in Pacbacks development, preventing unnecessary upgrades/changes that may introduce instability into production machines.

pacback-git: This package fetches the latest version from git. The master branch will be unstable periodically but is ideal for anyone looking to contribute to pacback's development or if you want access to the latest features and patches.

User Guide

While there are only a few CLI commands, they can be used in a wide variety of complex restoration tasks. The user guide has grown quite extensively in size and has been moved to its own page! Check it out here!

Developer Guide

Interested in helping develop pacback? Have questions about how it works? The detailed developer guide explains all the core features, codebase, and design philosophy of pacback. Check it out here!

pacback's People

Contributors

justintimperio avatar kidonng avatar selplacei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pacback's Issues

No snapshots being made

I have a mostly working up-to-date installation of pacback (not pacback-git) from the AUR--creating and restoring to restore points works--but no snapshots are being generated, whether I use paru or pacman directly.

image

Multiple packages installation should happen together

Asking one at time which individual package versions you want to install is of course necessary
But installation should happen for all at once.

First.. It's tiresome to be always confirming pacman that yes, I'm sure.
Second, there's even room to break something if you are downgrading some packages that are closely connected together and some seconds/minutes pass between each one version change.

KeyboardInterrupt error is not handled nicely

Describe the Bug:
App does not handle KeyboardInterrupts too nicely. Not an urgent matter

Output of Command
It looks like this

Do You Want to Remove These Packages From Your System? (y/n):^CTraceback (most recent call last):
  File "/usr/bin/pacback", line 115, in <module>
    rb.rollback_to_rp(version, args.rollback)
  File "/usr/share/pacback/core/rollback_rp.py", line 162, in rollback_to_rp
    if PS.YN_Frame('Do You Want to Remove These Packages From Your System?') is True:
  File "/usr/share/pacback/core/python_scripts/ps_defuns.py", line 58, in YN_Frame
    yn = input('\033[1m' + prompt + ' (y/n):' + '\033[0m')
KeyboardInterrupt

Machine (please fill in the following information):

  • Kernel Version: Linux gr3q-desktop 5.4.11-arch1-1 #1 SMP PREEMPT Sun, 12 Jan 2020 12:15:27 +0000 x86_64 GNU/Linux
  • Python Version: Python 3.8.1
  • Install Type: pacback
  • Pacback Version: Pacback Version: 1.6.1

To Reproduce
Steps to reproduce the behavior:

  1. Do a rollback
  2. Press Ctrl+C

Expected behavior
Exit without errors

ModuleNotFoundError: No module named 'rich'

when i tried to execute pacback -c 1 , it gives following error output :

Traceback (most recent call last):
  File "/usr/bin/pacback", line 9, in <module>
    import user
  File "/usr/share/pacback/core/user.py", line 4, in <module>
    from rich.table import Table
ModuleNotFoundError: No module named 'rich'

python-rich package is installed.

Add option to tag/label restore points

Describe the solution you'd like
Add a --label option or something when the restore point is created manually, also show the label if exist in -l, -rb and such.

Would add some context on why an user created it (or if its an automatic point creation, add that as well).

Can't create restore point

Hello.

Probably I'm missing something, but after installing your application I can't create a restore point.

I've created a /restore-point folder and cloned repository there, made a simlink.
After that I try to create a restore point:

sudo pacback -c 1
Building Light Restore Point...
Traceback (most recent call last):
File "/usr/bin/pacback", line 466, in
create_restore_point(args.create_rp, args.full_rp, args.add_dir)
File "/usr/bin/pacback", line 132, in create_restore_point
export_list(rp_path + '.meta', meta_list)
File "/restore-points/pacback/core/python_scripts/ps_linux.py", line 52, in export_list
with open(file_name, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/restore-points/pacback/restore-points/rp01.meta'

I would be glad if you explain me where I'm wrong. I've read help but can't get what I'm missing.

Thanks!

Automatic sudo is not handled correctly

Describe the Bug:
If pacback has started without sudo, sudo is asking for password, but pacback still throws the error that it must be ran as sudo

Output of Command

  • Output sent to the user in terminal
gr3q@gr3q-desktop ~> pacback -v
[sudo] password for gr3q: 
Pacback Must Be Run With Sudo OR As Root!
  • Log output in /var/log/pacback.log
2020/01/18-12:29:04.476195 : PreFlight : Started Logging Session
2020/01/18-12:29:04.486911 : PreFlight : Not Root!
2020/01/18-12:29:04.498016 : PreFlight : Ended Logging Session

Machine (please fill in the following information):

  • Kernel Version: Linux gr3q-desktop 5.4.11-arch1-1 #1 SMP PREEMPT Sun, 12 Jan 2020 12:15:27 +0000 x86_64 GNU/Linux
  • Python Version: Python 3.8.1
  • Install Type: pacback
  • Pacback Version: Pacback Version: 1.6.1

To Reproduce
Steps to reproduce the behavior:

  1. Run any pacback command without sudo with user account
  2. Enter password
  3. Observe

Expected behavior
The sudo should have been picked up by pacback

Allow install hook to add auto-incrementing hooks

Is your feature request related to a problem? Please describe.
It would be great if the install hook auto-incremented the restore point ids, that way they don't overwrite each other when full upgrades are performed.

Describe the solution you'd like
After installing the pacman install hook, the first pacman -Syu should create restore point #00, and the next #01, and so on...

This would mean that we'd create a "history" of restore points correlated to full upgrades, and would be invaluable when trying to roll back full upgrades that previously occurred.

Popen Error in `utils.reboot_check()`

Describe the Bug:
Failure during downgrade.

Output of Command

Traceback (most recent call last):
  File "/usr/bin/pacback", line 134, in <module>
    restore.restore_point(config, args.restore_point)
  File "/usr/share/pacback/core/restore.py", line 182, in restore_point
    utils.reboot_check(config)
  File "/usr/share/pacback/core/utils.py", line 298, in reboot_check
    if raw[0].strip() != raw[1].strip():
TypeError: 'Popen' object is not subscriptable

Machine (please fill in the following information):

  • Install Type: (both)

No option for `downgrade_pkg` argument

Describe the Bug:\

Python exception

Output of Command

  • Output sent to the user in terminal
$ sudo pacback -c 1          
Building Light Restore Point 01...
Restore Point Creation Complete!
Traceback (most recent call last):
  File "/usr/bin/pacback", line 124, in <module>
    if args.downgrade_pkg:
AttributeError: 'Namespace' object has no attribute 'downgrade_pkg'
  • Log output in /var/log/pacback.log
[17:01:30.132627] session.lock(): Started Logging Session
[17:01:30.132665] session.lock(): Passed Root Check
[17:01:30.135966] session.lock(): Started Active Session
[17:01:30.136105] session.setup(): User Config File Is Missing!
[17:01:30.136338] create.restore_point(01): Started Restore Point Creation...
[17:01:30.136398] create.restore_point(01): All Checks Passed! Handing Off to create.main()
[17:01:30.136450] create.main(rp01): Building ID:01 As Light Restore Point
[17:01:30.158638] create.main(rp01): Generated Meta Data File
[17:01:30.159192] create.main(rp01): Generated Meta Data Checksum
[17:01:30.159229] create.main(rp01): Main Build Complete of ID:01 As Light Restore Point
[17:01:30.159362] create.restore_point(01): Restore Point Creation Complete!
  • Config file in /etc/pacback/config
$LC_ALL=C cat /etc/pacback/config
cat: /etc/pacback/config: No such file or directory

Machine (please fill in the following information):

  • Kernel Version: (uname -r ) : 5.8.7-arch1-1
  • Python Version: (python3 --version) : Python 3.8.5
  • Python Rich Version (pacman -Q | grep python-rich): python-rich 6.0.0-1
  • Python Requests Version (pacman -Q | grep python-requests): python-requests 2.24.0-1
  • Pacback Version: (sudo pacback -v)
sudo pacback -v                 
Pacback Version: 2.0.0
PAF Version: 256fc62
Traceback (most recent call last):
  File "/usr/bin/pacback", line 88, in <module>
    cache = utils.cache_size(config)
  File "/usr/share/pacback/core/utils.py", line 310, in cache_size
    all_paths = find_pkgs_in_dir(fs_paths)
  File "/usr/share/pacback/core/utils.py", line 35, in find_pkgs_in_dir
    cache = {f for f in paf.find_files(path)
  File "/usr/share/pacback/core/paf/file.py", line 72, in find_files
    z = scan_dir(x)
  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: '/home/lost+found/.cache'
  • Install Type: (pacback vs pacback-git): pacback-git modified with the following prepare section:
prepare() {
  cd "${srcdir}/pacback"
  git submodule update --init --recursive
}

Spelling error

Minor report:

Spelling of 'were' inadvertently posted as 'where' in error message during full restore point creation:

Building Full Restore Point 03...
The Following Packages Where NOT Found!

And follow on question:

There were a number of packages reported as not found at time of creating a restore point. What does it mean? The packages are installed, so pacback didn't find older versions in the older packages folder (the \cache\pkg folder in Arch)?

AUR package

Hello, I made a PKGBUILD for pacback. I think it could drive interest and help if you had it up on AUR.

pkgname=pacback-git
pkgver=r56.77b20b3
pkgrel=1
pkgdesc='Advanced Rollback Version Control for Arch Linux - Alpha'
arch=('any')
url='https://github.com/JustinTimperio/pacback'
license=('MIT')
provides=('pacback')
depends=('python-tqdm' 'arch-install-scripts')

pkgver() {
  cd "${srcdir}/pacback"
  # Get the version number.
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  git clone --recurse-submodules https://github.com/JustinTimperio/pacback.git
}

package() {
  cd "${srcdir}/pacback"
  install -dm 755 "${pkgdir}"/{usr/share/pacback,usr/bin/}
  cp -dr --no-preserve='ownership' core "${pkgdir}"/usr/share/pacback
  #install -dm 755 core "${pkgdir}"/usr/share/pacback
  ln -sf /usr/share/pacback/core/pacback.py "${pkgdir}"/usr/bin/pacback
}

I can upload it to AUR and make you Co-Maintainer but you can also upload it yourself or not upload it at all, it's up to you to decide.

Bad offered packages version order

Describe the Bug:
10 seems understood as lesser than 6

Output of Command
Example, this is fine:

(1) xfce4-wavelan-plugin-0.6.0-1
(2) xfce4-wavelan-plugin-0.6.0-2
(3) xfce4-wavelan-plugin-0.6.1-1

Example, this is bad

(1) xfce4-weather-plugin-0.10.0-1
(2) xfce4-weather-plugin-0.8.10-1
(3) xfce4-weather-plugin-0.8.11-1

Machine:

  • Kernel Version: 4.14.160
  • Python Version: 3.8.1
  • Install Type: pacback
  • Pacback Version: 1.6.1

Help -h page formatting make it difficult to read

I have yet to try pacbac, but after filing this, planning on a deep dive with it in a virtual install. However, I got hung up trying to figure out how to use it using the help page, and noticed there's no man page. The help page formatting in my
vt shell (bash) made it very difficult to comprehend. The line length ran beyond the max vt width I had and continued on the next line, into the options column. I'd think there has to be some standards on formatting for Linux help and man pages, although I've not looked into this myself.

That said, I did find the github user guide easy to read and informative.

I reformatted, made a few edits to the help page for my personal notes. I've inserted my notes for some ideas on how the formatting may possibly be improved.

I also noticed it's been a few years since any activity. Are you still maintaining/updating pacbac?

usage: pacback	[-h] [-c 1] [--hook] [-rp 1] [-ss 1] [-pkg [pkg_name ...]] 
		[-dt 2020/06/23] [-f] [-d [/path/here ...]] [-nc] [-l Label Name] [-ih] [-rh]
		[-cl] [-rm 2] [-v] [-i 1] [-df 1 2 1 2] [-ls] [-cache]

options:

 -h     --help                          Show this help message and exit
 -c     --create_rp     <number>        Generate a pacback restore point.
        --hook                          Used by pacback hook to create snapshots.
 -rp    --restore_point <number>        Rollback to a restore point.
 -ss    --snapshot      <number>        Rollback to a snapshot.
 -pkg   --package       <pkg-names>     Rollback a list of packages.
 -dt    --date          <yyyy/mm/dd>    Rollback to a date in the ALA, Arch Linux Archive.
 -f     --full_rp                       Create full restore point.
 -d     --add_dir       </file/path/>   Add custom directories to your restore point when using `--full_rp`.
 -nc    --no_confirm                    Skip asking user questions. Will typically answer yes to all.
 -l     --label         <label-name>    Tag your restore point with a label.
 -ih    --install_hook                  Install a pacman hook that creates snapshots.
 -rh    --remove_hook                   Remove the pacman hook that creates snapshots.
 -cl    --clean                         Clean old packages, orphaned packages, and old restore points.
 -rm    --remove        <number>        Removes the selected restore point.
 -v     --version                       Display pacback version and cache info.
 -i     --info 1                        Print information about a restore point.
 -df    --diff          <ss rp>         Compare any two restore points or snapshots.
 -ls    --list                          List information about all existing restore points and snapshots.
 -cache --cache_size                    Calculate reported and actual cache sizes.
 -df    --diff          <ss rp>         Compare any two restore points or snapshots.

                                        Note: <ss> = snapshots,  <rp> = restore points.

 User guide with examples:              https://github.com/JustinTimperio/pacback/blob/master/USER_GUIDE.md

Problems with big rollbacks

So, funnily enough it seems like I'm always gravitating around your program after big releases.

  • old packages conflict with new dependencies

    • e.g. when downgrading glibc, libxcrypt's files blocks you (or same with wpebackend-fdo and webkit2gtk, or systemd and libp11-kit)
  • replaced packages are skipped (if it's not possible to parse automatically replaces from pkgs.. at least a manual list could do it?)

Pacback unable to find dhclient package (due to funky version string?)

Describe the Bug:
Pacback can't find the package for dhclient-4.4.2.P1-4 in the cache when creating a full restore point. For context, this is an official archlinux package in the extra repository. I'm not familiar with the code, but I'd guess it's something to do with the P in the package version. I've included example invocations of pacback below first without, then with dhclient installed. Let me know if you need anything else :)

Output of Command

  • Output sent to the user in terminal
[root@44ce9fbb04c7 pacback]# pacback -f -c 1
Restore Point #01 Already Exists!
Do You Want to Overwrite It? (y/n):y
Building Full Restore Point 01...
Restore Point Creation Complete!
[root@44ce9fbb04c7 pacback]# pacman -S dhclient
resolving dependencies...
looking for conflicting packages...

Package (2)     New Version  Net Change  Download Size

core/run-parts  5.5-1          0.04 MiB       0.03 MiB
extra/dhclient  4.4.2.P1-4     2.85 MiB       1.08 MiB

Total Download Size:   1.11 MiB
Total Installed Size:  2.90 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 dhclient-4.4.2.P1-4-x86_64 downloading...
 run-parts-5.5-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing run-parts...
installing dhclient...
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
  Skipped: Current root is not booted.
(2/2) Arming ConditionNeedsUpdate...
[root@44ce9fbb04c7 pacback]# pacback -f -c 2
Building Full Restore Point 02...

======================================
The Following Packages Were NOT Found!
======================================
dhclient-4.4.2.P1-4

Do You Still Want to Continue? (y/n):n
Aborting Creation!
[root@44ce9fbb04c7 pacback]# 
  • Log output in /var/log/pacback.log
======================== 2022/02/24 ========================
[15:46:05.132052] session.lock(): Started Logging Session
[15:46:05.132083] session.lock(): Passed Root Check
[15:46:05.132107] session.lock(): Started Active Session
[15:46:05.132351] create.restore_point(01): Started Restore Point Creation...
[15:46:06.791128] utils.remove_id(rp01): Removal Complete
[15:46:06.791195] create.restore_point(01): All Checks Passed! Handing Off to create.main()
[15:46:06.791236] create.main(rp01): Building ID:01 As Full Restore Point
[15:46:06.797770] utils.scan_caches(): Started Scaning Directories for Packages...
[15:46:06.798506] utils.scan_caches(): Searched ALL Package Cache Locations
[15:46:06.798545] utils.scan_caches(): Returned 159 Cached Packages
[15:46:06.798576] utils.search_cache(159): Started Search for Matching Versions...
[15:46:06.811879] utils.search_cache(159): Found 159 OUT OF 159 Packages
[15:46:06.819559] create.main(rp01): HardLinked 159 Packages
[15:46:06.826558] create.main(rp01): Generated Meta Data File
[15:46:06.826712] create.main(rp01): Generated Meta Data Checksum
[15:46:06.826742] create.main(rp01): Main Build Complete of ID:01 As Full Restore Point
[15:46:06.826782] create.restore_point(01): Restore Point Creation Complete!
[15:46:06.826829] session.unlock(): Ended Active Session
[15:46:06.826857] session.unlock(): Ended Logging Session

======================== 2022/02/24 ========================
[15:46:32.966923] session.lock(): Started Logging Session
[15:46:32.966955] session.lock(): Passed Root Check
[15:46:32.966979] session.lock(): Started Active Session
[15:46:32.967238] create.restore_point(02): Started Restore Point Creation...
[15:46:32.967304] create.restore_point(02): All Checks Passed! Handing Off to create.main()
[15:46:32.967350] create.main(rp02): Building ID:02 As Full Restore Point
[15:46:32.974560] utils.scan_caches(): Started Scaning Directories for Packages...
[15:46:32.975591] utils.scan_caches(): Searched ALL Package Cache Locations
[15:46:32.976599] utils.scan_caches(): Returned 161 Unique Cache Packages
[15:46:32.976650] utils.search_cache(161): Started Search for Matching Versions...
[15:46:32.990439] utils.search_cache(161): Found 160 OUT OF 161 Packages
[15:46:32.991069] create.main(rp02): Not All Packages Where Found!
[15:46:39.972499] create.main(rp02): ABORT: User Aborted Due to Missing Pkgs
[15:46:39.972614] session.unlock(): Ended Active Session
[15:46:39.972668] session.unlock(): Ended Logging Session
  • Config file in /etc/pacback.conf
## Pacback Config File
## Version 2.0.0

## Mandatory Settings

# Number Of Seconds Before The Snapshot Lock Expires
# MUST be an INT
hook_cooldown = 300

# Max Number Of Snapshots To Keep
# MUST be an INT
max_ss =  25

# Let The User Schedule a Reboot if Needed.
# If False Pacback Will Only Notify You
# MUST be True or False
reboot = True

## Optional Settings

# Number Of Minutes In Future To Schedule Reboot
# Only Runs After The Kernel Has Changed
# MUST be an INT
reboot_offset = 5

# Number of Old Cached Versions To Keep
# When Running a Pacback Cache Clean
# MUST be an INT
keep_versions = 3

# Number Of Days Before an RP is Flagged Old
# MUST be an INT
old_rp = 180

Machine (please fill in the following information):

  • Kernel Version: 5.16.10-arch1-1
  • Python Version: Python 3.10.2
  • Python Rich Version: python-rich 11.2.0-1
  • Python Requests Version: python-requests 2.27.1-1
  • Pacback Version: 2.1.0
  • Install Type: pacback (non-git)

To Reproduce
Steps to reproduce the behavior:

  1. Install dhclient (# pacman -S dhclient)
  2. Attempt to create a full restore point (# pacback -f -c 1)
  3. See warning The Following Packages Were NOT Found!...

Root is asked for really too many things

From running the program without any command at all (printing the --help information, or just not doing anything, would seem much better instead)
to even just using --version

Using pacback -pkg A B fails when A depends on B and vice versa

Describe the Bug:
Using pacback -pkg A B fails when A depends on B and vice versa.

Output of Command

sudo pacback -pkg gcc gcc-libs
Searching File System for Packages...
Pacback Found the Following Package Versions for gcc:
(1) gcc-10.1.0-1
(2) gcc-9.2.0-4
(3) gcc-9.2.1+20200130-2
(4) gcc-9.3.0-1
Enter Your Selection With an INT: 4
loading packages...
warning: downgrading package gcc (10.1.0-1 => 9.3.0-1)
resolving dependencies...
warning: cannot resolve "gcc-libs=9.3.0-1", a dependency of "gcc"
:: The following package cannot be upgraded due to unresolvable dependencies:
      gcc

:: Do you want to skip the above package for this upgrade? [y/N]
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'gcc-libs=9.3.0-1' required by gcc
Pacback Found the Following Package Versions for gcc-libs:
(1) gcc-libs-10.1.0-1
(2) gcc-libs-9.2.0-4
(3) gcc-libs-9.2.1+20200130-2
(4) gcc-libs-9.3.0-1
Enter Your Selection With an INT: 4
loading packages...
warning: downgrading package gcc-libs (10.1.0-1 => 9.3.0-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing gcc-libs (9.3.0-1) breaks dependency 'gcc-libs=10.1.0-1' required by gcc

Machine (please fill in the following information):

  • Kernel Version: 5.4.41-1-lts
  • Python Version: Python 3.8.3
  • Install Type: pacback via AUR
  • Pacback Version: Pacback Version: 1.6.1

To Reproduce
Steps to reproduce the behavior:

  1. Try to downgrade two packages that are dependent on one another. For example, gcc and gcc-libs.

Expected behavior
Pacback is able to downgrade both dependencies at the same time.

Maybe pacback could resolve the dependencies first, and then send them through to pacman in a batch?

pacback already has an active session running

I had issues similar to that reported under issue titled: Can't create restore point #5

Creating a restore point failed as pacback expected a specific folder to already exist (.cache in my case), and triggered an error. So I manually created the expected folder, but upon re-running:
$ sudo pacback -c 1

I continued to get this error:
Critical Error! Pacback Already Has An Active Session Running.
error: command failed to execute correctly

I tried to find a pacback process to kill but didn't find any, so I rebooted my system, after which the restore point was created.

After another error condition (I don't recall exactly what it was then), I starting getting that same error when I tried to update my system and the pre-upgrade pacback hook got triggered.

The issue seems to be that pacback isn't exiting gracefully under error conditions.

My distro: Arch Linux Kernel 5.8.7, python3 3.8.5, pacback 2.0.0-1

Pacback Already Has An Active Session Running.

Description
I already saw that other Issue that had the same problem, but the answers did not help.
Running

sudo rm /tmp/pacback_session.lck

does not help, because the file does not exist. I tried killing the process with htop but it also does not seem to exist. Rebooting did not help either. The issue happens with the normal pacback version and with the pacback-git version. My home directory is on the standard /home path.

It just says:
Critical Error! Pacback Already Has An Active Session Running.

My machine

  • Kernel Version: 5.8.7-arch1-1
  • Python Version: Python 3.8.5
  • Python Rich Version: 6.1.1-1
  • Python Requests Version: 2.24.0-1
  • Pacback Version: 2.0.2
  • PAF Version: 412fd69
  • Install Type: both give the same result

To Reproduce
Steps to reproduce the behavior:

  1. Run: sudo pacback -nc -f -c 1 -l 'Stable'

Expected behavior
It should create a Restore Point

Please help me. Thank you.

--rollback features request

So.. This would be really important to my use case (way more than the other petty issues I reported tonight), but I get that they aren't a walk in the park, so let's just this be a place to see if the wishlist is feasible at all.

  • the command should be able to work in combination with --pkg
  • I get partial {up,down}grades are the eleventh plage of egypt.. But if what you are actually caring for is bisecting in the name of bug hunting (and not current system stability), they are important
  • you shouldn't touch the system /etc/pacman.d/mirrorlist (or is that me dumb not using the hook?)
  • can't you like pass a temporary file to pacman --config? Or what am I missing here?

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.