Bug 14154 - paperwork 0.2 rpm request
Summary: paperwork 0.2 rpm request
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: New RPM package request (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 20:37 CEST by Xuo
Modified: 2014-10-10 05:43 CEST (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Xuo 2014-09-23 20:37:45 CEST
Paperwork is not available under Mageia 4. It could be interesting to have an rpm for that software.

Regards.

Xuo.


Reproducible: 

Steps to Reproduce:
Xuo 2014-09-23 20:39:27 CEST

CC: (none) => xuoy

Comment 1 Rémi Verschelde 2014-09-24 11:02:37 CEST
CC'ing Dimitrios who already worked on this package in his own repo.

I'll let you see if you want to import paperwork in Cauldron.

CC: (none) => dglent, remi

Comment 3 Rémi Verschelde 2014-09-27 18:11:10 CEST
You can import new packages in Cauldron even during the versions freeze.

How come the python-scikit-image is not noarch?
Comment 4 Dimitrios Glentadakis 2014-09-28 07:46:13 CEST
Ok then i will push them in Cauldron

The python-scikit-image has private libraries
Comment 5 Dimitrios Glentadakis 2014-09-28 13:59:26 CEST
ok, uploaded in cauldron

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 6 Xuo 2014-09-29 19:34:08 CEST
Hi,

All the .rpm listed above are not available :
Not Found

The requested URL /rpm/5/noarch/paperwork-0.2-1mgr5.noarch.rpm was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I can't test that they will be enough for paperwork 0.2 to be compiled.

Regards.

Xuo.
Comment 7 Dimitrios Glentadakis 2014-09-29 19:38:26 CEST
I have remove them from the local repository as they are available in Cauldron:
http://mageia.madb.org/package/show/release/cauldron/application/0/name/paperwork
Comment 8 Xuo 2014-09-29 20:13:31 CEST
Hi,

If you could tell me how to add the cauldron packages in the list of available mirrors, it would be great.
I tried with drakrpm-edit-media -> Add a personalized media with url = http://mageia.madb.org/package/show/name/paperwork/release/cauldron/application/0/arch/x86_64 but it doesn't work (I get some MD5 errors).

Regards.

Xuo.
Comment 9 Dimitrios Glentadakis 2014-09-29 20:17:40 CEST
I see in your first post that you have Mageia 4.
It is better to install rpm for Mageia 4

I will do it and i will inform you back
Comment 10 Xuo 2014-09-29 20:29:29 CEST
Thanks.
I know it is better but as it  is not available in mageia4, I try to test/install it as I can. If only 4 or 5 packages are concerned, then it might not be a big deal. If more packages need to be installed, then ...

Regards.

Xuo.
Comment 11 Dimitrios Glentadakis 2014-09-29 20:35:00 CEST
You can download the srpm that i have left here:
http://www.mageia-gr.org/rpm/5/SRPMS/

and create easy your packages in your system:
https://wiki.mageia.org/en/Packagers_RPM_tutorial

Just do the first steps from: "Foreword" to "From a source package"
Comment 12 Rémi Verschelde 2014-09-29 21:12:39 CEST
There is also a step by step guide for this: https://wiki.mageia.org/en/How_to_do_your_own_backports
Comment 13 Xuo 2014-10-01 22:34:09 CEST
Hi,

I can't compile the src.rpm. On the first one I tried :

rpmbuild -ba sansimera-qt.spec 
...
Traitement des fichiers : sansimera-qt-0.1-4.mga4.noarch                                                  
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images                                      
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/application-exit.png                 
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/dialog-information.png               
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/go-next-view.png                     
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/go-previous-view.png                 
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera.png                        
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera16x16.png                   
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera48x48.png                   
attention : Fichier listé deux fois : /usr/share/sansimera-qt/images/view-refresh.png                     
Trouver Provides : /usr/lib/rpm/mageia/filter.sh ' ' ' ' '/home/eric/rpmbuild/BUILDROOT/sansimera-qt-0.1-4.mga4.x86_64' /usr/lib/rpm/mageia/find-provides                                                           
  File "/usr/lib/rpm/mageia/pythoneggs.py", line 31                                                       
    print '-h, --help\tPrint help'                                                                        
                                 ^                                                                        
SyntaxError: invalid syntax                                                                               
error: /usr/lib/rpm/mageia/pythoneggs.py failed                                                           
erreur : /usr/lib/rpm/mageia/filter.sh a échoué : 100                                                     
erreur : Impossible de trouver Provides :                                                                 
Provides: sansimera-qt = 0.1-4.mga4                                                                       
Requires(rpmlib): rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1  

Erreur de construction de RPM :   
    Fichier listé deux fois : /usr/share/sansimera-qt/images                                              
    Fichier listé deux fois : /usr/share/sansimera-qt/images/application-exit.png
    Fichier listé deux fois : /usr/share/sansimera-qt/images/dialog-information.png     
    Fichier listé deux fois : /usr/share/sansimera-qt/images/go-next-view.png     
    Fichier listé deux fois : /usr/share/sansimera-qt/images/go-previous-view.png
    Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera.png       
    Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera16x16.png                           
    Fichier listé deux fois : /usr/share/sansimera-qt/images/sansimera48x48.png   
    Fichier listé deux fois : /usr/share/sansimera-qt/images/view-refresh.png                             
    /usr/lib/rpm/mageia/filter.sh a échoué : 100 
    Impossible de trouver Provides :                                                                      

If you understand the problem, I'll be glad that you explain to me.

Regards.

Xuo.
Comment 14 Dimitrios Glentadakis 2014-10-02 06:39:49 CEST
The above package is not part of paperwork dependancies (it is a program of mine)
The error has to be due a problem of python3 and rpmbuild in mga4 (?) showing the syntax error of python3...
--

You can find the packages here:
http://www.mageia-gr.org/rpm/4/
made by a member of mageia-gr

He has forgotten the python-sci-image, will be added tomorrow maybe (or you can do it ofcourse)
Comment 15 Dimitrios Glentadakis 2014-10-03 07:09:10 CEST
Ok all necessary packages are available in the repository http://www.mageia-gr.org/rpm/4/ (python-scikit-image for 64bit only)
Comment 16 Xuo 2014-10-05 11:25:42 CEST
Hi,

I could install everything. I did it in the following order (I don't know if it is important or not).
urpmi python-whoosh-2.5.7-1mgr4.noarch.rpm 
urpmi python-scikit-image-0.10.1-1mgr4.x86_64.rpm
urpmi python-pyocr-0.2.4-1mgr4.noarch.rpm
urpmi python-pyinsane-1.3.8-1mgr4.noarch.rpm
urpmi paperwork-0.2-2mgr4.noarch.rpm

Thanks to all for your help.

Regards.

Xuo.
Comment 17 Dimitrios Glentadakis 2014-10-05 12:34:36 CEST
Could you run succesfully the application ?
Did you use it ?  (to see if there are any problems)
Comment 18 Xuo 2014-10-05 16:32:47 CEST
Hi,

Yes, I can run paperwork. But I can't save any document. I'll ask for some help on the paperwork mailing list.
(it complains about a file that does not exist (which is true) but it does not use the correct name).

Regards.

Xuo.
Comment 19 Xuo 2014-10-05 16:54:00 CEST
Hi,

It is bugged. It refuses to use another directory than $USER/papers (or maybe $USER/Documents). If I tell it to use ~/Documents/PaperWork, it deletes the directory !!).

Regards.

Xuo.
Comment 20 Dimitrios Glentadakis 2014-10-06 06:51:08 CEST
I didn't see any bug reported here https://github.com/jflesch/paperwork/issues/
I tested it and it deletes the folder but if it is empty. If i have a file inside it doesn't delete it.
Could you create a new issue in github?
Comment 21 Dimitrios Glentadakis 2014-10-06 23:01:55 CEST
(In reply to Eric Bouyoux from comment #19)
> Hi,
> 
> It is bugged. It refuses to use another directory than $USER/papers (or
> maybe $USER/Documents). If I tell it to use ~/Documents/PaperWork, it
> deletes the directory !!).
> 
> Regards.
> 
> Xuo.

I looked at the code. It is not a bug but a feature !!!

        """
        Remove all the crap from the work dir (temporary files, empty
        directories, etc)
        """

Actually i don't agree. If i have an empty folder is not a crap. Maybe i need it for another usage.

Can you apply the following changes ?
Disable the cleanup:
[dglent@localhost backend]$ pwd
/usr/lib/python2.7/site-packages/paperwork/backend
[dglent@localhost backend]$ diff -u docsearch.py.orig docsearch.py
--- docsearch.py.orig   2014-09-21 21:23:57.000000000 +0200
+++ docsearch.py        2014-10-06 22:45:01.847343316 +0200
@@ -475,6 +475,8 @@
         Remove all the crap from the work dir (temporary files, empty
         directories, etc)
         """
+        logger.info("Cleanup is disabled")
+        return
         progress_cb(0, 1, self.INDEX_STEP_CLEANING)
         for filename in os.listdir(self.rootdir):
             filepath = os.path.join(self.rootdir, filename)

In the folder chooser dialog you have to go INSIDE the folder, not only selecte it.
This change fixes the folder chooser problem:

[dglent@localhost settingswindow]$ pwd
/usr/lib/python2.7/site-packages/paperwork/frontend/settingswindow
[dglent@localhost settingswindow]$ diff -u __init__.py.orig __init__.py
--- __init__.py.orig    2014-09-21 21:23:57.000000000 +0200
+++ __init__.py 2014-10-06 22:36:09.892720983 +0200
@@ -509,7 +509,7 @@
 
     def do(self):
         need_reindex = False
-        workdir = self.__settings_win.workdir_chooser.get_current_folder()
+        workdir = self.__settings_win.workdir_chooser.get_filename()
         if workdir != self.__config['workdir'].value:
             self.__config['workdir'].value = workdir
             need_reindex = True


Can you please test it ?
If ok, for the first issue about removing the empty folders, i don't know if it will be acceptable upstream as it is by design, but if you agree we can apply it in our package.
Comment 22 Xuo 2014-10-08 20:40:42 CEST
Hi,

I have created bug 342 (Paperwork delete the work directory selected at first time) under https://github.com/jflesch/paperwork/issues/342.
I made the changes you proposed and they work fine for me.

Regards.

Xuo.
Comment 23 Dimitrios Glentadakis 2014-10-09 06:30:16 CEST
Hello Eric, super, i have included the above modifications in cauldron.

;)
Comment 24 Xuo 2014-10-09 19:38:28 CEST
Hi,

And as you can see on https://github.com/jflesch/paperwork/issues/342, the developer agrees with your changes.

Regards.

Xuo.
Comment 25 Dimitrios Glentadakis 2014-10-10 05:43:12 CEST
Hi Eric, so the 'cleanup' deletes the empty folders only inside the folder that is selected as working folder.
But with the problem of choosing folder in the dialog, we were choosing accidentaly the personal folder every time :).
Then, after starting paperwork it deleted all empty folders in the personal folder (even Documents\, Download\ etc)

But even deleting the folders inside only the working directory without asking the user, is like the program administrates your computer and not you.
For this reason i uploaded both changes.
The one with the file chooser is pushed to git, the other with the cleanup he said in version 0.2 isn't necessary so he will handle it in a different way.

a+

Note You need to log in before you can comment on or make changes to this bug.