gscan2pdf requires sid repository

Questions about applications and software
Forum rules
Before you post please read this

gscan2pdf requires sid repository

Postby jwave on Mon May 07, 2012 2:46 pm

According to http://gscan2pdf.sourceforge.net/ I can use the standard Debian method (Synaptic or apt-get):
"If you are using Debian, you should find that sid has the latest version already packaged."


MY QUESTION:
How can I install a program that exists in the "sid" repository without messing up my repository and future updates?

Secondary questions:
Is there a way to add a reference to the "sid" repository that limits itself to gscan2pdf?

Is my repository messed up? If so, where?

Thank you, in advance, for your help.



SITUATION AND HISTORY:
I was able to use gscan2pdf, prior to UP3. At that time, I had monkeyed around with the repositories according to a variety of posts here in the forum.

In order to upgrade properly to UP3 and UP4, I reset my repositories to be "by the book" (to the best of my limited ability).

Upgrading to Update Pack 3 broke three things: gscan2pdf, VirtualBox, and my printing. Upgrading to UP4 did not change those breakages. This thread is only about gscan2pdf. (I plan to scour the forums for a printer and VirtualBox solution before posting for solutions. This program, gscan2pdf, currently holds the highest priority.)

I committed to UP4 around April 30, 2012.

I have been using GNU/Linux for about seven years. But, my ignorance about repositories inspires me to seek more qualified advice before tinkering any further. I hope to avoid reinstalling from the latest ISO and then re-cusomize everything from scratch, so I am posting here for help.



CURRENT CONFIG:
I am using 32-bit LMDE on a Lenovo T60 laptop.
CPU: Intel(R) Core(TM)2 CPU, T5600 @ 1.83GHz
RAM: 3GB

"lsb_release -a" said:
Code: Select all
No LSB modules are available.
Distributor ID:   LinuxMint
Description:   Linux Mint Debian Edition
Release:   1
Codename:   debian



"cat /etc/debian_version" said:
Code: Select all
wheezy/sid



"inxi -r" said:
Code: Select all
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://packages.linuxmint.com/ debian main upstream import
           deb http://debian.linuxmint.com/latest testing main contrib non-free
           deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
           deb http://debian.linuxmint.com/latest/multimedia testing main non-free
           deb http://www.lamaresh.net/apt sid main
           Active apt sources in file: /etc/apt/sources.list.d/google-chrome.list
           deb http://dl.google.com/linux/chrome/deb/ stable main

- - - - - - - - - - - - - - -
"apt-cache policy" said:
(note: "Pinned packages:" had no information)

Code: Select all
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages
     release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
     origin dl.google.com
 500 http://www.lamaresh.net/apt/ sid/main i386 Packages
     release c=main
     origin http://www.lamaresh.net
 500 http://debian.linuxmint.com/latest/multimedia/ testing/non-free i386 Packages
     release v=None,o=Unofficial Multimedia Packages,a=testing,n=wheezy,l=Unofficial Multimedia Packages,c=non-free
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/multimedia/ testing/main i386 Packages
     release v=None,o=Unofficial Multimedia Packages,a=testing,n=wheezy,l=Unofficial Multimedia Packages,c=main
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/security/ testing/updates/non-free i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=non-free
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/security/ testing/updates/contrib i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=contrib
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/security/ testing/updates/main i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=main
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/ testing/non-free Translation-en
 500 http://debian.linuxmint.com/latest/ testing/main Translation-en
 500 http://debian.linuxmint.com/latest/ testing/contrib Translation-en
 500 http://debian.linuxmint.com/latest/ testing/non-free i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=non-free
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/ testing/contrib i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=contrib
     origin debian.linuxmint.com
 500 http://debian.linuxmint.com/latest/ testing/main i386 Packages
     release o=Debian,a=testing,n=wheezy,l=Debian,c=main
     origin debian.linuxmint.com
 700 http://packages.linuxmint.com/ debian/import i386 Packages
     release v=1,o=linuxmint,a=debian,n=debian,l=linuxmint,c=import
     origin packages.linuxmint.com
 700 http://packages.linuxmint.com/ debian/upstream i386 Packages
     release v=1,o=linuxmint,a=debian,n=debian,l=linuxmint,c=upstream
     origin packages.linuxmint.com
 700 http://packages.linuxmint.com/ debian/main i386 Packages
     release v=1,o=linuxmint,a=debian,n=debian,l=linuxmint,c=main
     origin packages.linuxmint.com
Pinned packages:


Please let me know if there is any additional information that I neglected to report.
jwave
Level 1
Level 1
 
Posts: 5
Joined: Mon May 07, 2012 1:09 pm

Linux Mint is funded by ads and donations.
 

Re: gscan2pdf requires sid repository

Postby zerozero on Mon May 07, 2012 4:49 pm

yeahh, you can do that, using apt-pinning
http://wiki.debian.org/AptPreferences
http://www.debian.org/doc/manuals/debia ... f_archives
(just remember that lmde already has a preferences file, so you need to pay special attention to the rules already in there when adding new ones)
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Re: gscan2pdf requires sid repository

Postby jwave on Fri May 18, 2012 3:54 pm

Apparently, I misunderstood the instructions and applied them incorrectly because:

[1] PRIOR TO ALTERING /etc/apt/preferences and /etc/apt/sources.list: I used Update Manager to determine which files would be upgraded without Debian unstable. Update Manager reported only one program (Google Chrome) to be upgraded to version "19.0.1084.46-r135956".

[2] AFTER ALTERING sources.list and preferences to the config below: Update Manager wants to upgrade 922 files. (I assume those are unstable/sid upgrades)

[3] AFTER COMMENTING OUT the debian unstable entry in sources.list: Update Manager reverts to the solitary google-chrome-stable upgrade to version "19.0.1084.46-r135956" as before.

That suggests to me that I incorrectly configured my preferences file.

(...I thought that any priority less than zero would prevent installation/upgrade...)

What did I do wrong? (or better what can I do right to fix it?)

Thank you.


Activity history since last post:

I read:
I made the following changes:
  • added the debian unstable entry
  • removed the wine repository entry which currently fails due to a gpg error I have not researched and fixed. (fix only one thing at a time)
  • edited the /etc/apt/preferences file according to what I learned


"inxi -r" now says:
Code: Select all
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://packages.linuxmint.com/ debian main upstream import
           deb http://debian.linuxmint.com/latest testing main contrib non-free
           deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
           deb http://debian.linuxmint.com/latest/multimedia testing main non-free
           deb http://ftp.us.debian.org/debian unstable main contrib non-free
           Active apt sources in file: /etc/apt/sources.list.d/google-chrome.list
           deb http://dl.google.com/linux/chrome/deb/ stable main


Since my goal is to add only gscan2pdf from debian sid (and whatever support files are made necessary due to version conflicts) from sid, I made my changes to the /etc/apt/preferences file below the "Explanation" entries:

"/etc/apt/preferences" says:
Code: Select all
Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Debian
Pin-Priority: 500

Explanation: All three entries above were originally created by LMDE team.  Do not change!
Explanation: The following entries were added 20120517 by jwave, and intended to install gscan2pdf
Explanation:
Explanation: goal is to install ONLY gscan2pdf from unstable/sid
Explanation: additional packages may be added as per http://packages.debian.org/sid/gscan2pdf
Explanation: if version conflicts arise
Package: gscan2pdf
Pin: release a=unstable
Pin-Priority: 600

Explanation: goal is to prevent any unauthorized packages from unstable/sid being installed/upgraded
Package: *
Pin: release a=unstable
Pin-Priority: -100
jwave
Level 1
Level 1
 
Posts: 5
Joined: Mon May 07, 2012 1:09 pm

Re: gscan2pdf requires sid repository

Postby zerozero on Fri May 18, 2012 4:09 pm

it's all correct, except for this (as far as i can see)
Code: Select all
Package: *
Pin: release o=Debian
Pin-Priority: 500

this is part of the "old file" and gives all debian pkgs/lib a 500 priority (overwriting the -100 you have for unstable)

- try to take just that rule from the file you have in the previous post and try again.
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Re: gscan2pdf requires sid repository

Postby jwave on Sat May 19, 2012 1:45 pm

Thank you, zerozero!

That accomplished my goal. Now, I need to authorize the other packages through the preferences file.

Question regarding the part I commented out: I assume that the LMDE development team put that there for a reason. Am I going to mess up anything intended by the developers by leaving it commented out?

...I am going to continue my effort by adding the other packages to /etc/apt/preferences, testing things before committing, and await an answer about monkeying up the developer's intentions before marking this solved.

Thanks again.
jwave
Level 1
Level 1
 
Posts: 5
Joined: Mon May 07, 2012 1:09 pm

Re: gscan2pdf requires sid repository

Postby jwave on Sat May 19, 2012 3:23 pm

The results of my efforts have caused me to amend my goal:

I want to be able to add certain software packages (and support files) from unstable/sid without negatively impacting the functionality intended by the LMDE development team.

(I learned long ago to respect those who build things I appreciate and to not muck about indiscriminately with their inventions.)

Side-note: the installation completed, and I'm preparing to test the application on the hardware. So far, so good.
jwave
Level 1
Level 1
 
Posts: 5
Joined: Mon May 07, 2012 1:09 pm

Re: gscan2pdf requires sid repository

Postby zerozero on Sat May 19, 2012 3:53 pm

that file (the original preferences file) works well as-is and if you keep your system close to the vanilla sources.list.

if you start adding new entries into the sources.list file or looking for more complex ways of apt-pinning it can be problematic (as you saw now).
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

<SOLVED> gscan2pdf requires sid repository

Postby jwave on Tue May 22, 2012 1:25 pm

I firmly believe in the old adage: "Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for life."
Thank you to zerozero who pointed me in the right direction so I could learn.
Please do not skip the first step. If you make changes without understanding the risks or reasons, you learn nothing.


My solution has five major steps and assumes that you are working with the default (unaltered) files created by LMDE:

[1] Please READ the following documents FIRST


[2a] BEFORE MODIFYING ANY FILES: CREATE A BACKUP of these two files sources.list and preferences:
Code: Select all
sudo cp -p /etc/apt/sources.list /etc/apt/sources.list.orig
sudo cp -p /etc/apt/preferences /etc/apt/preferences.orig



[2b] (optional, but recommended) using Update Manager for testing, refresh the repository list, and take note of:
  • the quantity of packages it wants to upgrade
  • the names and version numbers of those applications


[3a] alter the two files as follows:
  • add to /etc/apt/sources.list the line:
    "deb http://ftp.us.debian.org/debian unstable main contrib non-free"

    ...so that it looks like this...
    Code: Select all
    deb http://packages.linuxmint.com/ debian main upstream import
    deb http://debian.linuxmint.com/latest testing main contrib non-free
    deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
    deb http://debian.linuxmint.com/latest/multimedia testing main non-free
    deb http://ftp.us.debian.org/debian unstable main contrib non-free

  • edit /etc/apt/preferences to look like this:
    Code: Select all
    Package: *
    Pin: release o=linuxmint
    Pin-Priority: 700

    Package: *
    Pin: origin packages.linuxmint.com
    Pin-Priority: 700

    Explanation: Package: *
    Explanation: Pin: release o=Debian
    Explanation: Pin-Priority: 500
    Explanation:
    Explanation: dependencies for gscan2pdf were found at http://packages.debian.org/sid/gscan2pdf
    Package: gscan2pdf
    Pin: release a=unstable
    Pin-Priority: 600

    Explanation: The following files are necessary for support to gscan2pdf
    Package: libsane-perl libgtk2-ex-podviewer-perl sane unpaper djvulibre-bin gocr tesseract-ocr cuneiform
    Pin: release a=unstable
    Pin-Priority: 600

    Explanation: goal is to prevent any unauthorized packages from unstable/sid being installed/upgraded
    Package: *
    Pin: release a=unstable
    Pin-Priority: -100

    You can remove/ignore the "Explanation" (comment) lines if you prefer
    Be sure to comment out or remove the third entry-block (containing "o=Debian")

After saving the files, reload the repositories.


[3b] (optional, but recommended)
  • Run Update Manager again,
  • refresh the repository list, and
  • compare the new results with step [2b]
  • If the upgrades do not match the results from step [2b] you have a problem.
    STOP! RETURN to the previous step and try again.
  • If the results are the same (or don't require upgrading gscan2pdf's requirements), then close Update Manager and continue...


[4] Install gscan2pdf using the method of your choice, apt-get or Synaptic Package Manager.
If you're going to this length, you should already know how to use one or the other.


[5a] Rename the modified sources.list and preferences files so you can return to them when you want to upgrade gscan2pdf at a later date.
Code: Select all
sudo mv /etc/apt/sources.list to /etc/apt/sources.list.gscan2pdf
sudo mv /etc/apt/preferences to /etc/apt/preferences.gscan2pdf

...then copy the original files back...
Code: Select all
sudo cp -p /etc/apt/sources.list.orig /etc/apt/sources.list
sudo cp -p /etc/apt/preferences.orig /etc/apt/preferences



[5b] (optional, but recommended) Load Update Manager, update the repositories, and verify that the upgrades it recommends are the same as before (in step [2b] and [3b]), just to be safe.

At this point, you should be finished!
jwave
Level 1
Level 1
 
Posts: 5
Joined: Mon May 07, 2012 1:09 pm

Re: gscan2pdf requires sid repository

Postby zerozero on Tue May 22, 2012 6:30 pm

looks good to me, i'm glad you got there :wink:
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 7 guests