Bug 1154282 - [rfe] support xdg base dir
Summary: [rfe] support xdg base dir
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ptrash
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: pjp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-18 10:41 UTC by Rahul Sundaram
Modified: 2017-03-08 06:17 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-08 06:17:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rahul Sundaram 2014-10-18 10:41:00 UTC
Description of problem:

ptrash stores user data in ~/.ptrash and should follow xdg base dir spec


References:

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

A non spec rationale

http://ploum.net/207-modify-your-application-to-use-xdg-folders/

Comment 1 Rahul Sundaram 2014-10-18 10:41:50 UTC
It might actually be better to follow xdg trash spec instead

http://freedesktop.org/wiki/Specifications/trash-spec/

Comment 2 Adhokshaj Mishra 2015-07-08 12:10:27 UTC
I have sent pull request to fix these issues in github repositoiry (https://github.com/pjps/ptrash).

Comment 3 pjp 2015-07-09 12:20:24 UTC
Hello Adhokshaj,

It is not a correct approach. You are trying to upgrade existing '.trashdb' implementation to support new trashinfo format. First, that'll break the existing implementation and secondly it is quite a messy thing to do.

I'd suggest, create a new source file trashinfo.c and write functions which would read & write individual 'file-name.trashinfo' files under '../Trash/info/' directory, with appropriate information. Once done, link trashinfo.c at compile time and de-link ptrashdb.c.

This way you have two 'clean' storage back-ends. You won't break ptrashdb.c functionality, which can be re-used with something else; Plus you'd have support for the new '.trashinfo' format.

Hope it helps.
--
* https://github.com/pjps/ptrash/pull/2#commitcomment-12078441

Comment 4 Adhokshaj Mishra 2015-07-09 12:44:50 UTC
(In reply to pjp from comment #3)
> Hello Adhokshaj,
> 
> It is not a correct approach. You are trying to upgrade existing '.trashdb'
> implementation to support new trashinfo format. First, that'll break the
> existing implementation and secondly it is quite a messy thing to do.
> 
> I'd suggest, create a new source file trashinfo.c and write functions which
> would read & write individual 'file-name.trashinfo' files under
> '../Trash/info/' directory, with appropriate information. Once done, link
> trashinfo.c at compile time and de-link ptrashdb.c.
> 
> This way you have two 'clean' storage back-ends. You won't break ptrashdb.c
> functionality, which can be re-used with something else; Plus you'd have
> support for the new '.trashinfo' format.
> 
> Hope it helps.
> --
> * https://github.com/pjps/ptrash/pull/2#commitcomment-12078441

Got that. Will do as per your suggestion.

Comment 5 pjp 2015-07-16 07:06:12 UTC
Hello Adhokshaj,

(In reply to Adhokshaj Mishra from comment #4)
> Got that. Will do as per your suggestion.

Did you have chance to work further on it? (just checking)

Thank you.

Comment 6 pjp 2015-08-01 06:21:29 UTC
Hi,

Did you have chance to work on it?

Comment 7 pjp 2016-10-01 17:53:59 UTC
This is addressed in commit
  -> https://github.com/pjps/ptrash/commit/4201c001f7a088ef4825dcd7fe26aee2792

It's work in progress and needs all the testing possible.

Comment 8 Fedora Update System 2017-01-04 08:32:00 UTC
ptrash-1.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f9b0865170

Comment 9 Fedora Update System 2017-01-04 08:32:10 UTC
ptrash-1.1-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-ddd5fedbb6

Comment 10 Fedora Update System 2017-01-04 08:32:18 UTC
ptrash-1.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d398e2fb8

Comment 11 Fedora Update System 2017-01-04 08:32:26 UTC
ptrash-1.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a551b1a275

Comment 12 Fedora Update System 2017-01-04 10:34:06 UTC
ptrash-1.1-1.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-04b08e857c

Comment 13 Fedora Update System 2017-01-04 22:22:11 UTC
ptrash-1.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a551b1a275

Comment 14 Fedora Update System 2017-01-04 23:29:13 UTC
ptrash-1.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d398e2fb8

Comment 15 Fedora Update System 2017-01-05 02:45:47 UTC
ptrash-1.1-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-04b08e857c

Comment 16 Fedora Update System 2017-01-05 02:47:40 UTC
ptrash-1.1-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-ddd5fedbb6

Comment 17 Fedora Update System 2017-01-05 02:48:56 UTC
ptrash-1.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f9b0865170

Comment 18 pjp 2017-03-08 06:17:14 UTC
This is fixed.


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