[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#930632: marked as done (unblock: libfm-qt/0.14.1-9)



Your message dated Sat, 22 Jun 2019 19:46:08 +0200
with message-id <89404589-0cca-ab6b-f173-77c661187477@debian.org>
and subject line Re: Bug#930632: unblock: libfm-qt/0.14.1-9
has caused the Debian Bug report #930632,
regarding unblock: libfm-qt/0.14.1-9
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
930632: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930632
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package libfm-qt

Latest version fixes #926803, missed file monitoring on remote file systems.
Without the fix remote filesystems are nearly unusable.


Diff:
diff --git a/debian/changelog b/debian/changelog
index 9bc9b25..54ef4eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libfm-qt (0.14.1-9) unstable; urgency=medium
+
+  * Added upstream patch workaround-missed-file-monitoring.patch
+    (Closes: #926803)
+  * Added two new symbols - internal use only
+
+ -- Alf Gaida <agaida@siduction.org>  Sat, 08 Jun 2019 16:39:11 +0200
+
 libfm-qt (0.14.1-8) unstable; urgency=medium
 
   * Removed the wrongly introduced build dependency on lxqt-qtplugin
diff --git a/debian/libfm-qt6.symbols b/debian/libfm-qt6.symbols
index d06f805..158bd23 100644
--- a/debian/libfm-qt6.symbols
+++ b/debian/libfm-qt6.symbols
@@ -531,12 +531,14 @@ libfm-qt.so.6 libfm-qt6 #MINVER#
  (c++)"Fm::Folder::filesAdded(Fm::FileInfoList&)@Base" 0.12.0
  (c++)"Fm::Folder::filesChanged(std::vector<std::pair<std::shared_ptr<Fm::FileInfo const>, std::shared_ptr<Fm::FileInfo const> >, std::allocator<std::pair<std::shared_ptr<Fm::FileInfo const>, std::shared_ptr<Fm::FileInfo const> > > >&)@Base" 0.12.0
  (c++)"Fm::Folder::filesRemoved(Fm::FileInfoList&)@Base" 0.12.0
+ (c++)"Fm::Folder::findByPath(Fm::FilePath const&)@Base" 0.14.1~
  (c++)"Fm::Folder::finishLoading()@Base" 0.12.0
  (c++)"Fm::Folder::fromPath(Fm::FilePath const&)@Base" 0.12.0
  (c++|arch= !armel !armhf !i386 !mips !mipsel !hppa !hurd-i386 !kfreebsd-i386 !m68k !powerpc !powerpcspe !sh4 !x32 )"Fm::Folder::getFilesystemInfo(unsigned long*, unsigned long*) const@Base" 0.12.0
  (c++|arch= !amd64 !arm64 !mips64el !ppc64el !s390x !alpha !ia64 !kfreebsd-amd64 !ppc64 !riscv64 !sparc64 )"Fm::Folder::getFilesystemInfo(unsigned long long*, unsigned long long*) const@Base" 0.12.0                                                                                                                                                                     
  (c++)"Fm::Folder::hadCutFilesUnset()@Base" 0.12.0                                                                                                                                   
  (c++)"Fm::Folder::hasCutFiles()@Base" 0.12.0                                                                                                                                        
+ (c++)"Fm::Folder::hasFileMonitor() const@Base" 0.14.1~                                                                                                                              
  (c++)"Fm::Folder::info() const@Base" 0.12.0                                                                                                                                         
  (c++)"Fm::Folder::isEmpty() const@Base" 0.12.0                                                                                                                                      
  (c++)"Fm::Folder::isIncremental() const@Base" 0.12.0                                                                                                                                
diff --git a/debian/patches/series b/debian/patches/series                                                                                                                            
index 1a4dd71..031051b 100644                                                                                                                                                         
--- a/debian/patches/series                                                                                                                                                           
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix-smb-recursive-copy.patch
 fix-license-headers.patch
 dont-ignore-crea-del-sequences.patch
 workaround-glib-recursive-moving-error.patch
+workaround-missed-file-monitoring.patch
diff --git a/debian/patches/workaround-missed-file-monitoring.patch b/debian/patches/workaround-missed-file-monitoring.patch
new file mode 100644
index 0000000..5be3811
--- /dev/null
+++ b/debian/patches/workaround-missed-file-monitoring.patch
@@ -0,0 +1,143 @@
+Description: Realod folder after transfer job if it lacks file monitoring
+ Closes https://github.com/lxqt/pcmanfm-qt/issues/933 and closes
+ https://github.com/lxqt/libfm-qt/issues/280. After a file transfer job is
+ finished inside a directory, if it is the path of an open folder that lacks
+ file monitoring, this patch reloads its corresponding folder. In this way, the
+ lack of file monitoring is partially compensated for.
+ Please note that this doesn't work with `search://` because the files inside
+ `search://` don't belong to it. By covering file creation, renaming, moving
+ from one shared folder to another and deleting after trying to move into Trash.
+
+Last-Update: 2019-06-08
+
+--- libfm-qt-0.14.1.orig/src/core/folder.cpp
++++ libfm-qt-0.14.1/src/core/folder.cpp
+@@ -112,6 +112,20 @@ std::shared_ptr<Folder> Folder::fromPath
+     return folder;
+ }
+ 
++// static
++// Checks if this is the path of a folder in use.
++std::shared_ptr<Folder> Folder::findByPath(const FilePath& path) {
++    std::lock_guard<std::mutex> lock{mutex_};
++    auto it = cache_.find(path);
++    if(it != cache_.end()) {
++        auto folder = it->second.lock();
++        if(folder) {
++            return folder;
++        }
++    }
++    return nullptr;
++}
++
+ bool Folder::makeDirectory(const char* /*name*/, GError** /*error*/) {
+     // TODO:
+     // FIXME: what the API is used for in the original libfm C API?
+@@ -142,6 +156,10 @@ bool Folder::isEmpty() const {
+     return files_.empty();
+ }
+ 
++bool Folder::hasFileMonitor() const {
++    return (dirMonitor_ != nullptr);
++}
++
+ FileInfoList Folder::files() const {
+     FileInfoList ret;
+     ret.reserve(files_.size());
+--- libfm-qt-0.14.1.orig/src/core/folder.h
++++ libfm-qt-0.14.1/src/core/folder.h
+@@ -56,6 +56,8 @@ public:
+ 
+     static std::shared_ptr<Folder> fromPath(const FilePath& path);
+ 
++    static std::shared_ptr<Folder> findByPath(const FilePath& path);
++
+     bool makeDirectory(const char* name, GError** error);
+ 
+     void queryFilesystemInfo();
+@@ -74,6 +76,8 @@ public:
+ 
+     bool isEmpty() const;
+ 
++    bool hasFileMonitor() const;
++
+     FileInfoList files() const;
+ 
+     const FilePath& path() const;
+--- libfm-qt-0.14.1.orig/src/fileoperation.cpp
++++ libfm-qt-0.14.1/src/fileoperation.cpp
+@@ -298,6 +298,8 @@ void FileOperation::onJobFinish() {
+     }
+     Q_EMIT finished();
+ 
++    bool tryReload = true;
++
+     // special handling for trash job
+     if(type_ == Trash && !job_->isCancelled()) {
+         auto trashJob = static_cast<Fm::TrashJob*>(job_);
+@@ -313,6 +315,26 @@ void FileOperation::onJobFinish() {
+                                         "Do you want to delete them instead?")) == QMessageBox::Yes) {
+                 deleteFiles(std::move(unsupportedFiles), false);
+             }
++            tryReload = false;
++        }
++    }
++
++    // reload the containing folder if it is in use but does not have a file monitor
++    if(tryReload) {
++        if(!srcPaths_.empty() && (type_ == Trash || type_ == Delete || type_ == Move)) {
++            auto parent_path = srcPaths_[0].parent();
++            if(parent_path != destPath_) { // otherwise, it will be done below
++                auto folder = Fm::Folder::findByPath(parent_path);
++                if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
++                    folder->reload();
++                }
++            }
++        }
++        if(destPath_) {
++            auto folder = Fm::Folder::findByPath(destPath_);
++            if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
++                folder->reload();
++            }
+         }
+     }
+ 
+--- libfm-qt-0.14.1.orig/src/utilities.cpp
++++ libfm-qt-0.14.1/src/utilities.cpp
+@@ -157,7 +157,8 @@ bool isCurrentPidClipboardData(const QMi
+ }
+ 
+ bool changeFileName(const Fm::FilePath& filePath, const QString& newName, QWidget* parent, bool showMessage) {
+-    auto dest = filePath.parent().child(newName.toLocal8Bit().constData());
++    auto parent_path = filePath.parent();
++    auto dest = parent_path.child(newName.toLocal8Bit().constData());
+     Fm::GErrorPtr err;
+     if(!g_file_move(filePath.gfile().get(), dest.gfile().get(),
+                     GFileCopyFlags(G_FILE_COPY_ALL_METADATA |
+@@ -170,6 +171,13 @@ bool changeFileName(const Fm::FilePath&
+         }
+         return false;
+     }
++
++    // reload the containing folder if it is in use but does not have a file monitor
++    auto folder = Fm::Folder::findByPath(parent_path);
++    if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
++        folder->reload();
++    }
++
+     return true;
+ }
+ 
+@@ -263,6 +271,12 @@ _retry:
+ 
+         QMessageBox::critical(parent ? parent->window() : nullptr, QObject::tr("Error"), err.message());
+     }
++    else { // reload the containing folder if it is in use but does not have a file monitor
++        auto folder = Fm::Folder::findByPath(parentDir);
++        if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
++            folder->reload();
++        }
++    }
+ }
+ 
+ uid_t uidFromName(QString name) {



unblock libfm-qt/0.14.1-9

-- System Information:
Debian Release: 10.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

--- End Message ---
--- Begin Message ---
Hi Alf,

On 17-06-2019 00:12, Alf Gaida wrote:
> unblock libfm-qt/0.14.1-9

Unblocked, thanks.

Paul

--- End Message ---

Reply to: